Crate fontconfig_parser

Source
Expand description

This crate provide parsing fontconfig file but not yet complete all features

see https://www.freedesktop.org/software/fontconfig/fontconfig-user.html for more detail infomation of fontconfig file

§Example

use fontconfig_parser::FontConfig;

let mut config = FontConfig::default();

config.merge_config("/etc/fonts/fonts.conf").unwrap();

Structs§

Alias
Alias elements provide a shorthand notation for the set of common match operations needed to substitute one font family for another. They contain a element followed by optional , and elements. Fonts matching the element are edited to prepend the list of ed families before the matching , append the able families after the matching and append the families to the end of the family list.
CacheDir
Config
Dir
DirData
Final dir data
Edit
FontConfig
Include
Match
RemapDir
This element contains a directory name where will be mapped as the path ‘as-path’ in cached information. This is useful if the directory name is an alias (via a bind mount or symlink) to another directory in the system for which cached font information is likely to exist. ‘salt’ property affects to determine cache filename as same as Dir element.
RemapDirData
Final remap-dirs data
SelectFont
Test
This element contains a single value which is compared with the target (‘pattern’, ‘font’, ‘scan’ or ‘default’) property “property” (substitute any of the property names seen above). ‘compare’ can be one of “eq”, “not_eq”, “less”, “less_eq”, “more”, “more_eq”, “contains” or “not_contains”. ‘qual’ may either be the default, “any”, in which case the match succeeds if any value associated with the property matches the test value, or “all”, in which case all of the values associated with the property must match the test value. ‘ignore-blanks’ takes a boolean value. if ‘ignore-blanks’ is set “true”, any blanks in the string will be ignored on its comparison. this takes effects only when compare=“eq” or compare=“not_eq”. When used in a element, the target= attribute in the element selects between matching the original pattern or the font. “default” selects whichever target the outer element has selected.

Enums§

BinaryOp
ConfigPart
Constant
DirPrefix
EditBinding
EditMode
Error
Expression
FontMatch
IntOrRange
ListOp
MatchTarget
PrefixBehavior
Property
PropertyKind
PropertyTarget
TernaryOp
TestCompare
TestQual
TestTarget
UnaryOp
Value
Runtime typed fontconfig value

Functions§

parse_config_parts
Parse as raw config parts use this when you want custom handling config file

Type Aliases§

Bool
CharSet
Double
Int
Result